package net.centrevillage.mgtw;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.util.*;

public class MyTableModel extends AbstractTableModel {
    private DefaultTableModel model;
    public MyTableModel(DefaultTableModel wrapped) {
        model = wrapped;
    }
    public void	addColumn(Object columnName)  {model.addColumn(columnName);}
    public void	addColumn(Object columnName, Object[] columnData)  {model.addColumn(columnName, columnData);}
    public void	addColumn(Object columnName, Vector columnData)  {model.addColumn(columnName, columnData);}
    public void	addRow(Object[] rowData)  {model.addRow(rowData);}
    public void	addRow(Vector rowData)  {model.addRow(rowData);}
//    protected static Vector	convertToVector(Object[] anArray)  {return DefaultTableModel.convertToVector(anArray);}
//    protected static Vector	convertToVector(Object[][] anArray)  {return DefaultTableModel.convertToVector(anArray);}
    public int	getColumnCount()  {return model.getColumnCount();}
    public String	getColumnName(int column)  {return model.getColumnName(column);}
    public Vector	getDataVector()  {return model.getDataVector();}
    public int	getRowCount()  {return model.getRowCount();}
    public Object	getValueAt(int row, int column)  {return model.getValueAt(row, column);}
    public void	insertRow(int row, Object[] rowData)  {model.insertRow(row, rowData);}
    public void	insertRow(int row, Vector rowData)  {model.insertRow(row, rowData);}
    public boolean	isCellEditable(int row, int column)  {return false;}
    public void	moveRow(int start, int end, int to)  {model.moveRow(start, end, to);}
    public void	newDataAvailable(TableModelEvent event)  {model.newDataAvailable(event);}
    public void	newRowsAdded(TableModelEvent e)  {model.newRowsAdded(e);}
    public void	removeRow(int row)  {model.removeRow(row);}
    public void	rowsRemoved(TableModelEvent event)  {model.rowsRemoved(event);}
    public void	setColumnCount(int columnCount)  {model.setColumnCount(columnCount);}
    public void	setColumnIdentifiers(Object[] newIdentifiers)  {model.setColumnIdentifiers(newIdentifiers);}
    public void	setColumnIdentifiers(Vector columnIdentifiers)  {model.setColumnIdentifiers(columnIdentifiers);}
    public void	setDataVector(Object[][] dataVector, Object[] columnIdentifiers)  {model.setDataVector(dataVector, columnIdentifiers);}
    public void	setDataVector(Vector dataVector, Vector columnIdentifiers)  {model.setDataVector(dataVector, columnIdentifiers);}
    public void	setRowCount(int rowCount)  {model.setRowCount(rowCount);}
    public void	setValueAt(Object aValue, int row, int column)  {model.setValueAt(aValue, row, column);}

    public void	addTableModelListener(TableModelListener l) {model.addTableModelListener(l);}
    public int	findColumn(String columnName) {return model.findColumn(columnName);}
    public void	fireTableCellUpdated(int row, int column) {model.fireTableCellUpdated(row, column);}
    public  void	fireTableChanged(TableModelEvent e) {model.fireTableChanged(e);}
    public  void	fireTableDataChanged() {model.fireTableDataChanged();}
    public  void	fireTableRowsDeleted(int firstRow, int lastRow)  {model.fireTableRowsDeleted(firstRow, lastRow);}
    public  void	fireTableRowsInserted(int firstRow, int lastRow)  {model.fireTableRowsInserted(firstRow, lastRow);}
    public  void	fireTableRowsUpdated(int firstRow, int lastRow)  {model.fireTableRowsUpdated(firstRow, lastRow);}
    public  void	fireTableStructureChanged() {model.fireTableStructureChanged();}
    public Class<?>	getColumnClass(int columnIndex) {
      return getValueAt(0, columnIndex).getClass();
    }
    public <T extends EventListener> T[] getListeners(Class<T> listenerType) {return model.getListeners(listenerType);}
    public TableModelListener[]	getTableModelListeners() {return model.getTableModelListeners();}
    public void	removeTableModelListener(TableModelListener l) {model.removeTableModelListener(l);}
}
